package com.mxpio.erp.common.workshop.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpio.erp.common.inventory.entity.Warehouse;
import com.mxpio.erp.common.technology.entity.ItemGroup;
import com.mxpioframework.jpa.annotation.DictAble;
import com.mxpioframework.security.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Transient;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @Author : 吴盼盼
 * @Datetime : 2022/10/28 23:20
 * @Desc :
 * @Modor :  Modifytime:
 * @modDesc : 生产订单缺件分析结果
 */
@Data
public class MoStortageAnalysisVO implements DictAble, Serializable {

	private static final long serialVersionUID = 1L;


    @Schema(description = "物料编码")
    private String itemCode;

    @Schema(description = "物料名称")
    private String itemName ;

    @Schema(description = "规格型号")
    private String itemSpec;

    @Schema(description = "物料组")
    @Dict(dicCode="groupCode", dicEntity = ItemGroup.class, dicText = "groupName")
    private String itemGroupCode;

    @Schema(description = "单位编号")
    @Dict(dicCode="ERP_TECH_UNIT_CODE")
    private String unitCode;

    @Column(name = "DRAWING_NO_")
    @Schema(description = "图号")
    private String drawingNo;

    @Schema(description = "物料来源")
    @Dict(dicCode="ERP_TECH_ITEM_SOURCE")
    private String itemSource;

    @Schema(description = "需求数量")
    private BigDecimal orderQuantity;

    @Transient
    @Schema(description = "库存数量")
    private BigDecimal stockQuantity;

    @Schema(description = "缺件数量")
    private BigDecimal lackQuantity;


    @Schema(description = "涉及生产订单号")
    private String moBizNos;

    @Schema(description = "涉及生产订单产品图号")
    private String moProdDrawingNos;
    private Map<String, String> textMap;
    @Override
    public String putText(String key, String value) {
        if (textMap == null) {
            textMap = new HashMap<>();
        }
        return textMap.put(key, value);
    }
}
